<include file="Public:header"/>


<body data-tuktuk="boxes">

<include file="Public:left"/>
<include file="Public:aside"/>

    <section>
        <include file="Public:nav" />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">样式设置</h4>
            </div>            
            <hr />
            <form name="form" action="{:U('Admin/Styles/save')}" method="post" class="margin">
            <h5 class="text book inline">全局设置</h5>
                <fieldset>
                    <label>背景图片:<small>对所有页面有效</small></label>
                    <input type="text" class="webupload" name="background-image" value="{$vo.background-image}">
                    <a to="background-image" data-fancybox-type="iframe" class="button small fancybox" href="{:U('Admin/FileManager/index')}#background-image">上传</a>
                </fieldset>
                <fieldset>
                    <label>背景设置:<small>背景图片设置</small></label>
                    <span class="select">
                        <select data="{$vo.background-repeat}" style="width:200px" name="background-repeat">
                            <option value="no-repeat">不平铺</option>
                            <option value="repeat">完全平铺</option>
                            <option value="repeat-y">上下平铺</option>
                            <option value="repeat-x">左右平铺</option>
                        </select>
                        <select data="{$vo.background-position}" style="width:200px" name="background-position">
                            <option value="">默认</option>
                            <option value="left">居左</option>
                            <option value="center">居中</option>
                            <option value="right">居右</option>
                        </select>
                        <select data="{$vo.background-attachment}" style="width:200px" name="background-attachment">
                            <option value="">请选择</option>
                            <option value="fixed">固定</option>
                            <option value="repeat">浮动</option>
                        </select>
                    </span>
                    
                </fieldset>
                <fieldset>
                    <label>透明度:<small>1为不透明0为完全透明,建议0.8</small></label>
                    <input id="body-opacity" type="text"  name="body-opacity" value="{$vo.body-opacity}">
                </fieldset>
                <fieldset>
                    <label>背景颜色:<small>所有页面有效</small></label>
                    <input id="background-color" type="text" class="color iColorPicker" name="background-color" value="{$vo.background-color}">
                </fieldset>
                <fieldset>
                    <label>文本颜色:<small>所有页面有效</small></label>
                    <input id="font-color" type="text" class="color iColorPicker" name="font-color" value="{$vo.font-color}">
                </fieldset>                
            <h5 class="text book inline">首页设置</h5>
                <fieldset>
                    <label>首页背景图片:<small>首页有效</small></label>

                    <input type="text" class="webupload" name="index-background-image" value="{$vo.index-background-image}">
                    <a to="index-background-image"  data-fancybox-type="iframe" class="button small fancybox" href="{:U('Admin/FileManager/index')}#index-background-image">上传</a>
                </fieldset>
                <fieldset>
                    <label>首页背景颜色:<small>首页有效</small></label>
                    <input id="index-background-color" type="text" class="color iColorPicker" name="index-background-color" value="{$vo.index-background-color}">
                </fieldset>
            <h5 class="text book inline">其他设置</h5>
                <fieldset>
                    <label>标题文字颜色:<small>所有页面有效</small></label>
                    <input id="title-font-color" type="text" class="color iColorPicker" name="title-font-color" value="{$vo.title-font-color}">
                </fieldset>

                <fieldset>
                    <label>标题背景颜色:<small>所有页面有效</small></label>
                    <input id="title-background-color" type="text" class="color iColorPicker" name="title-background-color" value="{$vo.title-background-color}">
                </fieldset>

                <fieldset>
                    <label>菜单背景色:<small>所有菜单有效</small></label>
                    <input id="menu-background-color" type="text" class="color iColorPicker" name="menu-background-color" value="{$vo.menu-background-color}">
                </fieldset>
                <fieldset>
                    <label>菜单文字颜色:<small>所有页面有效</small></label>
                    
                    <input id="menu-font-color" type="text" class="color iColorPicker" name="menu-font-color" value="{$vo.menu-font-color}">
                </fieldset>
                <fieldset>
                    <label>侧边栏背景色:<small>所有页面有效</small></label>
                    <input id="aside-background-color" type="text" class="color iColorPicker" name="aside-background-color" value="{$vo.aside-background-color}">
                </fieldset>
                <fieldset>
                    <label>侧边栏文字颜色:<small>所有页面有效</small></label>
                    <input id="aside-font-color" type="text" class="color iColorPicker" name="aside-font-color" value="{$vo.aside-font-color}">
                </fieldset>
                <fieldset>
                    <label>底部导航背景色:<small>所有页面有效</small></label>
                    <input id="nav-background-color" type="text" class="color iColorPicker" name="nav-background-color" value="{$vo.nav-background-color}">
                </fieldset>
                <fieldset>
                    <label>底部导航文字颜色:<small>所有页面有效</small></label>
                    <input id="nav-font-color" type="text" class="color iColorPicker" name="nav-font-color" value="{$vo.nav-font-color}">
                </fieldset>
            <hr />
                <button type="submit" class="theme create-app-startpic save">保存</button>
            </form>
              
        </article>
        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
</body>

<load href="__PUBLIC__/js/app.js" />
<load href="__PUBLIC__/fancyBox/jquery.fancybox.css" />
<load href="__PUBLIC__/fancyBox/jquery.fancybox.min.js" />
<load href="__PUBLIC__/iColorPicker.js" />

<script type="text/javascript">
$(function(){

    $('select[data]').each(function(){
        var v = $(this).attr('data');
        $(this).val(v);
    })

    $('form').on('submit',function(e){
        e.preventDefault();
        var pars = $(this).find('input,select').serialize();
        var url = "{:U('Admin/Styles/save')}";
        $.post(url,pars,function(resq){
            alert('保存成功');
            location.reload();
        })
    })

    $(".fancybox").fancybox({
        maxWidth    : 800,
        maxHeight   : 900,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none',
    });
    iColorPicker();

})  
 
</script>
</html>
